import ZSI
from ZSI.schema import TypeDefinition, GTD

class serviceTypes:
    targetNamespace = "name.shturman.homebuh/types/"

    class User_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
        schema = "name.shturman.homebuh/types/"
        type = (schema, "User")
        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
            ns = serviceTypes.User_Def.schema
            TClist = [ZSI.TC.String(pname="login", aname="_login", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="name", aname="_name", minOccurs=1, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="email", aname="_email", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
            self.attribute_typecode_dict = attributes or {}
            if extend: TClist += ofwhat
            if restrict: TClist = ofwhat
            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
            class Holder:
                typecode = self
                def __init__(self):
                    self._login = None
                    self._name = None
                    self._email = None
                    return
            Holder.__name__ = "User_Holder"
            self.pyclass = Holder
            
    class Money_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
        schema = "name.shturman.homebuh/types/"
        type = (schema, "Money")
        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
            ns = serviceTypes.Money_Def.schema
            TClist = [ZSI.TC.Decimal(pname="amount", aname="_amount", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="currency", aname="_currency", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
            self.attribute_typecode_dict = attributes or {}
            if extend: TClist += ofwhat
            if restrict: TClist = ofwhat
            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
            class Holder:
                typecode = self
                def __init__(self):
                    self._amount = None
                    self._currency = None
                    return
            Holder.__name__ = "Money_Holder"
            self.pyclass = Holder

    class ArrayOfMoney_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
        schema = "name.shturman.homebuh/types/"
        type = (schema, "ArrayOfMoney")
        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
            ns = serviceTypes.ArrayOfMoney_Def.schema
            TClist = [GTD("name.shturman.homebuh/types/","Money",lazy=False)(pname="money", aname="_money", minOccurs=0, maxOccurs="unbounded", nillable=True, typed=False, encoded=kw.get("encoded"))]
            self.attribute_typecode_dict = attributes or {}
            if extend: TClist += ofwhat
            if restrict: TClist = ofwhat
            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
            class Holder:
                typecode = self
                def __init__(self):
                    self._Money = []
                    return
            Holder.__name__ = "ArrayOfMoney_Holder"
            self.pyclass = Holder

    class ArrayOfAccounts_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
        schema = "name.shturman.homebuh/types/"
        type = (schema, "ArrayOfAccounts")
        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
            ns = serviceTypes.ArrayOfAccounts_Def.schema
            TClist = [GTD("name.shturman.homebuh/types/","Account",lazy=False)(pname="account", aname="_account", minOccurs=0, maxOccurs="unbounded", nillable=True, typed=False, encoded=kw.get("encoded"))]
            self.attribute_typecode_dict = attributes or {}
            if extend: TClist += ofwhat
            if restrict: TClist = ofwhat
            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
            class Holder:
                typecode = self
                def __init__(self):
                    self._Accounts = []
                    return
            Holder.__name__ = "ArrayOfAccounts_Holder"
            self.pyclass = Holder


    class Account_Def(ZSI.TCcompound.ComplexType, TypeDefinition):
        schema = "name.shturman.homebuh/types/"
        type = (schema, "Account")
        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw):
            ns = serviceTypes.Account_Def.schema
            TClist = [ZSI.TCnumbers.Iinteger(pname="id", aname="_id", minOccurs=1, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="name", aname="_name", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("name.shturman.homebuh/types/","ArrayOfMoney",lazy=False)(pname="initialAmounts", aname="_initialAmounts", minOccurs=0, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded"))]
            self.attribute_typecode_dict = attributes or {}
            if extend: TClist += ofwhat
            if restrict: TClist = ofwhat
            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw)
            class Holder:
                typecode = self
                def __init__(self):
                    self._id = None
                    self._name = None
                    self._initialAmounts = None
                    return
            Holder.__name__ = "Account_Holder"
            self.pyclass = Holder
